/*
    COMP9517 Computer Vision, Semester 2, 2011 - University of New South Wales
   ============================================================================
   |   Group .  | Christian Mostegel & Dong Back Kim                          |
   ============================================================================
 */

#ifndef POINTCLOUD_H
#define POINTCLOUD_H

#include <qlist.h>

#include "Point3D.h"

class PointCloud
{

private:

    QList<Point3D> m_points;

public:

    void    setPoints(const QList<Point3D> & points) { m_points = points; }
    Point3D getPoint(int index) const   { return m_points[index]; }
    int     getPointCount() const       { return m_points.size(); }
    void    append(const Point3D & point){m_points.append(point);}
    void    append(const QList<Point3D> & points){m_points.append(points);}
    void    removePoint(int index){m_points.removeAt(index);}
    void    updatePoint(int index, double x, double y, double z)
    {
        m_points[index].setX(x);
        m_points[index].setY(y);
        m_points[index].setZ(z);
    }

    void    clear() { m_points.clear(); }

public:

    PointCloud();

};

#endif // POINTCLOUD_H
